<template>
  <div id="app">
<!--    <router-view v-if="this.config.login_state"></router-view>-->
    <el-container>
      <el-header id="he" height="60px">
        <el-row style="margin: 10px 0">
          <el-col :span="1" ><div id="ce">测试</div></el-col>
          <el-col :span="1" :offset="20"><el-button type="primary"  size="mini"  round  ><router-link class="xai" to="login" >登录</router-link></el-button></el-col>
<!--          <el-col :span="1"><el-button type="primary"  size="mini" round><router-link class="xai" to="register"  >注册</router-link></el-button></el-col>-->
        </el-row>
      </el-header>
      <el-container id="container"  >
        <el-aside id="nav" width="182px" style="background: #C0C4CC">
          <el-row class="tac" style="background: #C0C4CC;height: 982px " >
            <el-col id="col" :span="24">
              <el-menu
                style="background: #C0C4CC"
                id="caidan"
                router
                default-active="2"
                class="el-menu-vertical-demo"
                @open="handleOpen"
                @close="handleClose">
                <el-submenu index="1">
                  <template slot="title" >
                    <span >接口自动化</span>
                  </template>
                  <el-menu-item-group style="background: #C0C4CC">
                    <el-menu-item index="/api_record">接口录入</el-menu-item>
                    <el-menu-item index="/config">配置</el-menu-item>
                    <el-menu-item index="/scene_record">场景录入</el-menu-item>
                    <el-menu-item index="/scene_script">场景脚本录入</el-menu-item>
                    <el-menu-item index="/script_order">脚本执行日志</el-menu-item>
<!--                    <el-menu-item index="/script_use">脚本使用</el-menu-item>-->
                  </el-menu-item-group>

                </el-submenu>
                <el-menu-item index="/case">
                  <span slot="title">用例管理</span>
                </el-menu-item>

              </el-menu>
            </el-col>
          </el-row>
        </el-aside>
        <el-container>
          <el-main>
            <router-view ></router-view>
          </el-main>
<!--          <el-footer>Footer</el-footer>-->
        </el-container>
      </el-container>
    </el-container>

  </div>
</template>

<script>

export default {
  name: 'App',

  methods: {

    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style>
#ce{

  font-size: 20px;
}
#he{
  background: #909399;
}
.xai {
  text-decoration: none;
}
</style>
